package com.fitcoders.inscripcion.dao;


import java.io.Serializable;
import java.util.List;
import java.util.Map;

public interface GenericDAO {

    public Serializable save(Object model);
    
    public Serializable saveAnyId(Object model);
    
    public void saveList(List list);

    public <T> void saveOrUpdate(T t);
    
    public <T> T getById(Class<T> type, Integer id);
    
    public <T> T getByHQL(String hql, Map<String, Object> parameters, Class<T> type);

    public <T> void delete(T t);
    
    public <T> void deleteCollecton(List t);

    public void update(Object model);
    
    public void update(String sql, boolean isSQL);

    public List listHQL(String hql, Map<String, Object> parameters, Class clazz);

    public List listSQL(String sql, Map<String, Object> parameters, Class clazz);
    
    public Object count(String query, Map<String, Object> parameters);
    
    public List listLazyHQL(String queryName, Map<String, Object> parameters, int start, int finish, Class clazz);
    
 
}
